<?php

class Corner_description_Model extends ORM

{

	protected $table_name = 'corner_description'; 

	protected $primary_key = 'corner_description_id'; 

	protected $col_language_id = 'languages_id';

	protected $sorting = array('corner_description_id' => 'desc');

	

	public function get($corner_description_id ='',$language_id='')

	{

		$this->db->select('*');

		$this->db->from($this->table_name);		

		$this->db->orderby($this->primary_key,'desc');

		if($corner_description_id  	) $this->db->where($this->primary_key,$corner_description_id);

		if($language_id) $this->db->where($this->col_language_id,$language_id);

		$query = $this->db->get();

		return $query->result_array(false);

		

	}
	public function get_with_active($language_id='')

	{

		$this->db->select('*');

		$this->db->from($this->table_name);		

		$this->db->orderby($this->primary_key,'desc');

		
		if($language_id) $this->db->where($this->col_language_id,$language_id);

		$query = $this->db->get();

		return $query->result_array(false);

		

	}
	

	

}